1. Field
The present application relates to a nonvolatile memory device using a nonvolatile memory such as a flash memory. The present application relates to a nonvolatile memory controller that controls the nonvolatile memory.
2. Description of Related Art
A nonvolatile memory device incorporating a nonvolatile memory has been put to practical use as a memory card, and the market for memory cards of a digital camera and a portable telephone is expanding. The memory card increasingly has a larger capacity and higher speed so as to meet the increase in pixels of a digital camera and the recording of moving images or the like with a portable telephone.
The nonvolatile memory incorporated in the memory card is mainly a flash memory. In the flash memory, the size of a physical block, i.e., a clear unit is likely to increase as the capacity becomes larger. However, a management unit of the memory card is constant when viewed from the host and a user manipulating the host. Consequently, both the data management in the host and the data management in the flash memory need to be controlled by the control of a nonvolatile memory controller incorporated in the memory card.
In general, the management unit of data that is stored in the memory card by the host is smaller than the physical block (with a capacity of 256 kilobytes to 512 kilobytes) of the flash memory and can be, e.g., 16 kilobytes. Therefore, the nonvolatile memory controller controls a state in which data is written halfway through the physical block.
JP 2007-241618 A discloses a semiconductor memory device including a nonvolatile memory controller that has an error correction function to improve the reliability of a nonvolatile memory device. In the semiconductor memory device of JP 2007-241618 A, an error-correcting code is attached to data when it is written into the nonvolatile memory, and an error correction is performed when the data is read along with the error-correcting code from the nonvolatile memory. This error correction function also is performed to detect a power shutdown of the nonvolatile memory device during the writing of data into the nonvolatile memory. Thus, the semiconductor memory device of JP 2007-241618 A can detect an abnormal operation in which the error correction cannot be performed since anomalous data is written into the nonvolatile memory due to a power shutdown during writing, and also can detect an abnormal operation in which a power shutdown occurs probabilistically based on a written mark.
JP 2008-198299 A discloses a semiconductor memory device including a nonvolatile memory controller that has a scramble function to improve the reliability of a nonvolatile memory. In the semiconductor memory device of JP 2008-198299 A, scrambled data is written into the nonvolatile memory.
The detection of the abnormal operation due to a power shutdown using the written mark disclosed in JP 2007-241618 A is achieved by writing fixed data into the nonvolatile memory. Therefore, it is not appropriate for the data scramble technology applied as the background in JP 2008-198299 to be used in the technology of JP 2007-241618 A. Although JP 2007-241618 A and JP 2008-198299 A teach the technologies for improving the data reliability, it is difficult to use both technologies simultaneously.